#include <stdio.h>
#include <stdlib.h>

#include <xfifo/vfifo.h>
#include <xfifo/pfifo.h>

static void vfifo_demo(void)
{
    struct vfifo _vfifo;
    struct vfifo *vfifo = &_vfifo;
    void *data = malloc(1024);
    int err;

    if (!data) {
        printf("malloc failed\n");
        return;
    }

    err = vfifo_init(vfifo, data, 1024, 1);

    printf("vfifo_size: %d\n", vfifo_size(vfifo));

    free(data);
}

int main(int argc, const char *argv)
{
    printf("hello demo\n");

    vfifo_demo();

    return 0;
}
